package cn.kgc.kgde.bookstore.service.impl;

import cn.kgc.kgde.bookstore.entity.Cartitem;
import cn.kgc.kgde.bookstore.mapper.CartitemMapper;
import cn.kgc.kgde.bookstore.service.CartitemService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author myt
 * @since 2022-05-23
 */
@Service
public class CartitemServiceImpl extends ServiceImpl<CartitemMapper, Cartitem> implements CartitemService {


    @Resource
    private CartitemMapper cartitemMapper ;
    @Override
    public void deleteById(Cartitem cartitem) {
        System.out.println("cartitem = " + cartitem);
        QueryWrapper wrapper = new QueryWrapper();
        wrapper.eq("cartId",cartitem.getCartId());
        this.cartitemMapper.delete(wrapper);
    }

}
